// JavaScript Document
function check()
{
	var cond=true;
	if(document.currency.currtitle.value.length==0)
	{
		alert("Please Enter Currency Title.");
		if(cond==true)
		{
			document.currency.currtitle.focus();
		}
		cond=false;
		return false;
	}	
	if(document.currency.currcode.value==0)
	{
		alert("Please Enter Currency Code.");
		if(cond==true)
		{
			document.currency.currcode.focus();
		}
		cond=false;
		return false;
	}
	if(document.currency.currvalues.value.length==0)
	{
		alert("Please Enter Currency Value.");
		if(cond==true)
		{
			document.currency.currvalues.focus();
		}
		cond=false;
		return false;
	}	
	
	if(!IsNumeric(document.currency.currvalues.value))
	{
		alert("Please Enter Numeric Values for Currency Values.");
		if(cond==true)
		{
			document.currency.currvalues.focus();
		}
		cond=false;
		return false;
			
	}
}	

//  only insert integer no in Age field.
function IsNumeric(sText)
{
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;

   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
}

